export function addTitleListener(){
    let oldTitle:string = document.title;
    let handleTime:number = 2000;
    let timer:any = null;
    document.addEventListener("visibilitychange",()=>{
        if(document.hidden){
            document.title = "w(ﾟДﾟ)w 不要走！再看看嘛！"
            clearTimeout(timer)
        }else{
            document.title = "♪(^∇^*)欢迎回来！"
            timer = setTimeout(()=>{
                document.title = oldTitle;
            },handleTime)
        }
    })
}
